package demo01;

public class Facade {
    public SubStystemOne one;
    public SubStystemTwo two;
    public SubStystemThree three;
    public SubStystemFour four;
    /**
     * 外观类，他需要了解所以的子系统的方法或属性，进行组合
     * 以备外界的调用
     */

    public Facade() {
        one=new SubStystemOne();
        two=new SubStystemTwo();
        three=new SubStystemThree();
        four=new SubStystemFour();
    }
    public void MethodoneA(){
        System.out.println("组合方法1   1-3-4 ");
        one.Methodone();
        three.MethodThree();
        four.MethodFour();
    }
    public void Methodoneb(){
        System.out.println("组合方法2  ");
        one.Methodone();
        two.MethodTwo();
        four.MethodFour();
    }
}
